package com.yugao.fintech.antelope.pay.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yugao.fintech.antelope.pay.model.entity.PayInterfaceConfig;
import com.yugao.fintech.antelope.pay.model.rqrs.PayConfigQL;
import com.yugao.fintech.antelope.pay.model.rqrs.PayInterfaceConfigRQ;
import com.yugao.fintech.antelope.pay.model.rqrs.PayInterfaceConfigRS;
import com.yugao.fintech.antelope.pay.model.rqrs.PayInterfaceRQ;

import java.util.List;


public interface PayInterfaceConfigService extends IService<PayInterfaceConfig> {
    List<PayInterfaceConfigRS> listPayIfConfig(PayConfigQL query);

    void updatePayIfConfig(PayInterfaceConfigRQ req);

    /**
     * 根据 账户类型、账户号、接口类型 获取支付参数配置
     */
    PayInterfaceConfig getByInfoIdAndIfCode(String infoType, String infoId, String ifCode);

    void addPayIf(PayInterfaceRQ req);

    /**
     * 通过id删除支付配置
     *
     * @param id 支付配置id
     */
    void deletePayIfConfig(String id);

    /**
     * 查询商户app使用已正确配置了通道信息
     */
    boolean mchAppHasAvailableIfCode(String appId, String ifCode);
}
